home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Various / DevDisk 65 (1989)(DevWare PD).zip / DevDisk 65 (1989)(DevWare PD).adf / prosuite / color.h < prev    next >
C/C++ Source or Header  |  1990-07-11  |  3KB  |  93 lines

  1.  
  2. /* *** color.h **************************************************************
  3.  *
  4.  * ColorWindow Routine  --  Include File
  5.  *     from Book 1 of the Amiga Programmers' Suite by RJ Mical
  6.  *
  7.  * Copyright (C) 1986, 1987, Robert J. Mical
  8.  * All Rights Reserved.
  9.  *
  10.  * Created for Amiga developers.
  11.  * Any or all of this code can be used in any program as long as this
  12.  * entire copyright notice is retained, ok?  Thanks.
  13.  *
  14.  * The Amiga Programmer's Suite Book 1 is copyrighted but freely distributable.
  15.  * All copyright notices and all file headers must be retained intact.
  16.  * The Amiga Programmer's Suite Book 1 may be compiled and assembled, and the 
  17.  * resultant object code may be included in any software product.  However, no 
  18.  * portion of the source listings or documentation of the Amiga Programmer's 
  19.  * Suite Book 1 may be distributed or sold for profit or in a for-profit 
  20.  * product without the written authorization of the author, RJ Mical.
  21.  * 
  22.  * HISTORY      NAME            DESCRIPTION
  23.  * -----------  --------------  --------------------------------------------
  24.  * 20 Oct 87    - RJ            Make the window draggable
  25.  * 3 Jan 87     RJ >:-{)*       Clean-up for release      
  26.  * 27 Feb 86    =RJ Mical=      Modified these routines for Zaphod
  27.  * January 86   =RJ=            Modified the originals for Mandelbrot
  28.  * Late 85      =RJ=            Created the color window for Graphicraft
  29.  *
  30.  * *********************************************************************** */
  31.  
  32.  
  33.  
  34. #include <prosuite/prosuite.h>
  35.  
  36.  
  37.  
  38. /* === The definitions for ColorWindow =================================*/
  39. #define COLOR_LEFT        0
  40. #define COLOR_TOP        9
  41.  
  42. #define COLOR_KNOB_BODY     0x1000
  43.  
  44. /* Extra width to make room for numeric readout */
  45. #define NEW_EXTRALEFT        24
  46.  
  47. #define COLORWINDOW_WIDTH    (208 + NEW_EXTRALEFT + COLOR_LEFT)
  48. #define COLORWINDOW_HEIGHT    (91 + COLOR_TOP)
  49.  
  50. #define CHARACTER_WIDTH     8
  51. #define CHARACTER_HEIGHT    8
  52.  
  53. #define COLOR_BOX_LEFT        (COLOR_LEFT + 7)
  54. #define COLOR_BOX_TOP        (COLOR_TOP + 6)
  55. #define COLOR_BOX_RIGHT     (COLOR_BOX_LEFT + 15)
  56. #define COLOR_BOX_BOTTOM    (COLOR_BOX_TOP + 29)
  57. #define COLOR_COLOR_TOP     (COLOR_TOP + 45)
  58. #define COLOR_PROP_LEFT     (COLOR_LEFT + 41)
  59. #define COLOR_PROP_TOP        (COLOR_TOP + 4)
  60. #define COLOR_PROP_WIDTH    165
  61. #define COLOR_PROP_HEIGHT    10
  62. #define COLOR_CLUSTER_LEFT    (COLOR_LEFT + 144)
  63. #define COLOR_CLUSTER_TOP    (COLOR_TOP + 41)
  64. #define COLOR_CLUSTER_WIDTH    (CHARACTER_WIDTH * 6 + 10 + NEW_EXTRALEFT)
  65. #define COLOR_CLUSTER_HEIGHT    9
  66. #define COLOR_HSL_TOP        COLOR_PROP_TOP
  67. #define COLOR_HSL_LEFT        (COLOR_PROP_LEFT - 14)
  68.  
  69. #define COLOR_VALUE_X        (COLOR_PROP_LEFT + COLOR_PROP_WIDTH + 4)
  70. #define COLOR_VALUE_REDY    (COLOR_PROP_TOP + 1 + 6)
  71. #define COLOR_VALUE_GREENY    (COLOR_VALUE_REDY + COLOR_PROP_HEIGHT + 1)
  72. #define COLOR_VALUE_BLUEY    (COLOR_VALUE_GREENY + COLOR_PROP_HEIGHT + 1)
  73.  
  74. /* GREEN and RED are out of order to facilitate the color cycle window sharing
  75.  * these gadgets with the color palette window (color cycle uses the gadgets
  76.  * only down to the COLOR_GREEN gadget)
  77.  * (And that's why, in case you have always been wondering.  Now the
  78.  * next mystery is:  why didn't I explain this before?)
  79.  */
  80. #define COLOR_COPY        0
  81. #define COLOR_RANGE        1
  82. #define COLOR_OK        2
  83. #define COLOR_CANCEL        3
  84. #define COLOR_GREEN        4
  85. #define COLOR_RED        5
  86. #define COLOR_BLUE        6
  87. #define COLOR_HSL_RGB        7
  88. #define COLOR_GADGETS_COUNT    8
  89.  
  90. #define RGBHSL_SIZE    29        /* Number of words per image */
  91.  
  92.  
  93.